package cn.ratel.component;

import java.util.ArrayList;
import java.util.List;

public class Plugins {
	private static final List<Plugin> plugins = new ArrayList<>();

	private Plugins() {
	}

	private static Plugins me = new Plugins();

	public static Plugins me() {
		return me;
	}

	public List<Plugins.Plugin> getPlugins() {
		return plugins;
	}

	public void addPlugin(Plugins.Plugin plugin) {
		plugins.add(plugin);
	}

	public interface Plugin {
		void start();

		void stop();
	}
}
